/**
 * 作者：陈文斌 on 2019/1/5.
 * 邮箱：chen_wennbin@163.com
 * 版本：v1.0
 */

import 'package:flutter/material.dart';
import 'package:crm/constant/constant.dart';

class ClientManagerBottomSection extends StatefulWidget {
  final Function addClientAction;
  final Function addLatencyClientAction;
  @override
  ClientManagerBottomSection({Key key,this.addClientAction,this
      .addLatencyClientAction}): super(key: key);
  State<StatefulWidget> createState() => _ClientManagerBottomSectionState();
}

class _ClientManagerBottomSectionState
    extends State<ClientManagerBottomSection> {
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 45,
      color: Color(0xFF1F8CEB),
      child: Row(
        children: <Widget>[
          Expanded(
            child: MaterialButton(
              onPressed: () {
                if(widget.addClientAction != null){
                  widget.addClientAction();
                }
              },
              child: Text(
                '添加客户',
                style: TextStyle(
                  color: Colors.white,
                  fontSize: AppFontSizes.Font14,
                  fontFamily: AppFontFamilies.PingFangSC,
                ),
              ),
            ),
          ),
          Expanded(
            child: MaterialButton(
              onPressed: () {
                if(widget.addLatencyClientAction != null){
                  widget.addLatencyClientAction();
                }
              },
              child: Text(
                '添加潜在客户',
                style: TextStyle(
                  color: Colors.white,
                  fontSize: AppFontSizes.Font14,
                  fontFamily: AppFontFamilies.PingFangSC,
                ),
              ),
            ),
          )
        ],
      ),
    );
  }
}
